package com.colorfruit.admin.business.dao;

import com.colorfruit.admin.pojo.entity.GlobalProcessionControl;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

public interface GlobalProcessionControlMapper {
    int deleteByPrimaryKey(Long id);

    int insert(GlobalProcessionControl record);

    int insertSelective(GlobalProcessionControl record);

    GlobalProcessionControl selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(GlobalProcessionControl record);

    int updateByPrimaryKey(GlobalProcessionControl record);

    /**
     * 获取时间控制阶段
     * @param startTime
     * @param endTime
     * @return
     */
    GlobalProcessionControl selectTheDayProcession(@Param("startTime") Date startTime,
                                                   @Param("endTime") Date endTime);

    GlobalProcessionControl getRecentProcession();

    /**
     * 变更进度状态
     * @param id
     * @param status
     * @return
     */
    Integer updateStatus(@Param("id") Long id,
                         @Param("status") Byte status);

}